#!/usr/bin/env bash
source /etc/profile

do_date='2020-10-16'

hdfs dfs -mkdir -p /user/data/trade.db/product_category/dt=$do_date

python $DATAX_HOME/bin/datax.py -p "-Ddo_date=$do_date" /root/scripts/datax/product_category.json

hive -e "alter table ods.ods_trade_product_category add partition(dt='$do_date');"